func minEatingSpeed(piles []int, h int) int {
	return sort.Search(1000000000, func(k int) bool {
        if k == 0 {
            return false
        }
		time := 0
		for _, p := range piles {
			time += (p - 1) / k + 1
		}
		return time <= h
	})
}